﻿using System.Collections.Generic;

namespace EdalSoft.Data
{
    public class Parameters
    {
        private Dictionary<string, Parameter> _items = new Dictionary<string, Parameter>();

        public void Add(string name, object value, Parameter.ParDirection dir = Parameter.ParDirection.In, int size = 0)
        {
            Items.Add(name, new Parameter(name, value, dir, size));
        }

        public Dictionary<string, Parameter> Items { get { return _items; } set { _items = value; } }

        public struct Parameter
        {
            public enum ParDirection { In, Out, InOut };

            public Parameter(string name, object value, ParDirection direction, int size) : this()
            { Name = name; Value = value; Direction = direction; Size = size; }

            public string Name { get; private set; }
            public object Value { get; private set; }
            public ParDirection Direction { get; private set; }
            public int Size { get; private set; }
        }
    }

}
